﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Zpsq.aspx.cs" Inherits="Catering.Catering_Page.Kufang.Zpsq" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>杂品申请</title>
    <link rel="stylesheet" type="text/css" href="../../Style/head.css" />
    <link rel="stylesheet" type="text/css" href="../../Style/center.css" />
    <%-- <link href="../../Style/zhezhao.css" rel="stylesheet" type="text/css" />--%>
    <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../Style/xxk.js" type="text/javascript"></script>
    <script src="../../Style/zhezhao.js" type="text/javascript"></script>
    <link href="../../Style/zhezhao.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="../../Scripts/My97DatePicker/WdatePicker.js"></script>
    <style type="text/css">
        .Create_Recipe
        {
            margin-top: 0;
        }
        .Create_Recipe
        {
            border: 1px solid #159aec;
            border-top: none;
            width: 998px;
        }
        .soso_lt
        {
            padding: 5px 0;
        }
        .soso_lt a
        {
            margin-left: 3px;
        }
        .style1
        {
            width: 50px;
        }
        .style3
        {
            height: 21px;
        }
        .div_120
        {
            padding-top: 5px;
            background-color: #e5f1ff;
        }
        .div_120 ul
        {
            width: 996px;
            clear: both;
        }
        .div_120 li
        {
            float: left;
            height: 25px;
            line-height: 25px;
            margin-left: 10px;
            padding-bottom: 5px;
        }
        .div_120 span
        {
            text-align: left;
            display: -moz-inline-box;
            display: inline-block;
            width: 60px;
        }
        .table_zpsq_add td
        {
            min-height: 30px;
            vertical-align: middle;
        }
    </style>
    <script language="javascript" type="text/javascript">
//        $(document).ready(function () {
//            $("#dr_Group").change(function () {
//                var GroupID = $("#dr_Group").val();
//                $.ajax({
//                    type: "Post",
//                    url: "Zpsq.aspx/GetBanZuOption",
//                    data: "{'cid':'" + GroupID + "'}",
//                    contentType: "application/json; charset=utf-8",
//                    dataType: "json",
//                    success: function (data) {
//                        $("#dr_Class").html(data.d);
//                    }
//                });
//            });
//        });
        function Add() {
            $("#div2 input[type='text']").val("");
            divshow("div2", "div1");
        }

        function IsEdit() {
            if (confirm("您确定要审批？")) return true;
            return false;
        }

        function IsDelete() {
            if (confirm("您确定要删除？")) return true;
            return false;
        }
    </script>
</head>
<body>
    <form id="from1" runat="server">
    <asp:HiddenField ID="HFSession" runat="server" Value='0' />
    <div class="Center_Content" id="div3" style="display: block">
        <div class="div_0207 left_width500" style="height: 34px; width: 998px; background: url(../Images/div_h1_bg.gif)">
            <table cellpadding="0" cellspacing="0" border="0" width="100%" class="ckgl_table"
                style="height: 34px;">
                <tr>
                    <td align="right" style="width: 30px">
                        按：
                    </td>
                    <td width="90">
                        <asp:DropDownList ID="DDL_an" runat="server" Width="80" CssClass="select_input_bg"
                            AutoPostBack="true" OnSelectedIndexChanged="DDL_an_SelectedIndexChanged">
                            <asp:ListItem Value="State">状态</asp:ListItem>
                            <asp:ListItem Value="SName">品名</asp:ListItem>
                            <asp:ListItem Value="temp1">申请日期</asp:ListItem>
                            <asp:ListItem Value="SType">杂品类别</asp:ListItem>
                            <asp:ListItem Value="PID">申请人</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td width="210">
                        <asp:TextBox ID="txt_Seacher" CssClass="input_bg" runat="server" Width="200" />
                    </td>
                    <td width="90">
                        <asp:Button ID="but_Seach" runat="server" Text="查询" OnClick="but_Seach_Click" CssClass="input_btn_a" />
                    </td>
                    <td align="right">
                        <input type="button" value="添加申请" onclick='Add()' class="input_btn_a" />
                    </td>
                    <td width="10">
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div style="height: 10px; clear: both;">
    </div>
    <div class="Center_Content" id="div2_3" style="display: block; min-height:450px; border: #c2def6 1px solid;">
        <table width="100%" class="swxx_table" cellpadding="0" cellspacing="0" style="text-align: center;">
            <thead>
                <tr>
                    <td width="4%">
                        序号
                    </td>
                    <td width="12%">
                        班组
                    </td>
                    <td width="12%">
                        杂品类别
                    </td>
                    <td width="12%">
                        杂品名称
                    </td>
                    <td width="6%">
                        数量
                    </td>
                    <td width="11%">
                        杂品规格
                    </td>
                    <td width="8%">
                        申请人
                    </td>
                    <td width="7%">
                        申请状态
                    </td>
                    <td width="14%">
                        申请理由
                    </td>
                    <td width="14%" colspan="2" style="border-right:none;">
                        操作
                    </td>
                </tr>
            </thead>
            <tbody id="request_Info">
                <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
                    <ItemTemplate>
                        <tr style="background: #ffffff;" onmouseover="this.style.background='#E3F5FF'" onmouseout="this.style.background='#FFFFFF'">
                            <th style="border-bottom: 1px solid #ccc; background-color: #f5f5f5; border-right: 1px solid #ccc;
                                height: 32px">
                                <%--<%# Eval("id") %>--%><%#Container.ItemIndex + 1%>
                            </th>
                            <td>
                                <%#this.GetClassName(Eval("ClassID").ToString()) %>
                            </td>
                            <td>
                                <%# Eval("temp2")%>&nbsp;
                            </td>
                            <td>
                                <%# Eval("SName") %>&nbsp;
                            </td>
                            <td>
                                <%# Eval("Number") %>&nbsp;
                            </td>
                            <td>
                                <%# Eval("Specifications") %>&nbsp;
                            </td>
                            <td>
                                <%#this.GetPersonnelNaem(Eval("PID").ToString()) %>&nbsp;
                            </td>
                            <td>
                                <%#Eval("State").ToString() == "0" ? "未审批" : "已审批"%>&nbsp;
                            </td>
                            <td>
                                <%# Eval("Description") %>&nbsp;
                            </td>
                            <td align="center">
                                <%
                                    if (IsAdmin())
                                    {
                                %>
                                <asp:Button ID="Button2" runat="server" OnClientClick="return IsDelete()" CommandName="del"
                                    Text="删除" CssClass="input_btn_a" Style="height: 18px; line-height: 18px; width: 55px;
                                    background-position: -2px -2px; border: 1px solid #ABC2E4;" CommandArgument='<%#Eval("id")%>' />
                                <%
                                    }
                                %>
                                </td>
                                <td align="center">
                                <%
                                    if (Catering.Toolss.IsVerification(Session["RoleID"].ToString(), "Zpsq.aspx", "审批"))
                                    {
                                %>
                                <asp:Button ID="btn_sp" runat="server" OnClientClick="return IsEdit()" CommandName="shenpi"
                                    Text="审批" CssClass="input_btn_a" Style="height: 18px; line-height: 18px; width: 55px;
                                    background-position: -2px -2px; border: 1px solid #ABC2E4;" CommandArgument='<%#Eval("id")%>' />
                                <%
                                    }
                                %>
                                
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
            </tbody>
        </table>
    </div>
    <div class="footer">
        <strong>中海油能源发展配餐服务公司渤海自营油田作业公司</strong><span>版权所有@CopyRight 2012</span></div>
    <div id="div1" class="bg">
    </div>
    <!--弹出层-->
    <div id="div2" class="center_div" style="width: 400px; padding: 10px 0px; margin-top: -130px;">
        <table cellpadding="0" cellspacing="0" border="0" align="center" class="table_zpsq_add">
            <tr>
                <td>
                    作业区：
                </td>
                <td width="130">
                    <asp:DropDownList ID="dr_Group" runat="server" CssClass="select_input_bg" 
                        Width="122" AutoPostBack="True" 
                        onselectedindexchanged="dr_Group_SelectedIndexChanged" />
                </td>
                <td width="45" align="right">
                    班组：
                </td>
                <td>
                    <asp:DropDownList ID="dr_Class" runat="server" CssClass="select_input_bg" Width="122" />
                </td>
            </tr>
            <tr>
                <td align="right">
                    名 称：
                </td>
                <td>
                    <input type="text" id="txt_Name" class="input_bg" runat="server" style="width: 120px;" />
                </td>
                <td align="right">
                    规格：
                </td>
                <td>
                    <input type="text" id="txt_CMP" class="input_bg" runat="server" style="width: 120px;" />
                </td>
            </tr>
            <tr>
                <td align="right">
                    类 别：
                </td>
                <td>
                    <input type="text" id="txt_type" class="input_bg" runat="server" style="width: 120px;" />
                </td>
                <td align="right">
                    数量：
                </td>
                <td>
                    <input type="text" id="txt_Number" class="input_bg" runat="server" style="width: 120px;" />
                </td>
            </tr>
            <tr>
                <td align="right" height="60">
                    用 途：
                </td>
                <td colspan="3">
                    <textarea id="txt_yongtu" class="input_bg" runat="server" style="width: 295px; height: 50px;"></textarea>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td align="center">
                    <asp:Button ID="but_add_Info" runat="server" CssClass="input_btn_a" OnClick="but_add_Info_click"
                        Text="申 请" />
                </td>
                <td colspan="2" align="center">
                    <input type="button" id="Button1" onclick='divhidel("div1","div2")' class="input_btn_a"
                        value="取 消" />
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
